#include "World.h"

namespace Peanut {

	World::World(const std::string& id) : cg::Entity(id) {
	}
	World::~World() {
	}
	void World::init() {
		cg::tWindowInfo win = cg::Manager::instance()->getApp()->getWindowInfo();
		_winWidth = win.width;
		_winHeight = win.height;
		_border = 10;
	}
	void World::draw() {
       // glPushMatrix();
		//glTranslatef(0.0f,0.0f,0.0f);
       // glColor3f(0.13f,0.55f,0.13f);
		//glutSolidCube(10);
      //  glPopMatrix();
		glColor3d(0.13,0.55,0.13);
		glBegin(GL_POLYGON);
			glVertex3f(0,0,-1);
			glVertex3f(0,_winHeight,-1);
			glVertex3f(_winWidth,_winHeight,-1);
			glVertex3f(_winWidth,0,-1);
		glEnd();
	}

	

}